import { defineStore } from 'pinia'

export const useCountStore = defineStore('count', {
    actions: {
        increment(value){
            // this是当前的useCountStore
            // this.$state.sum += value
            this.sum += value
        }
    },
    state(){
        return {
            sum: 6
        }
    },
    getters: {
        bigSum(state){
            return state.sum * 10
        }
    }
})